package com.dingding.thirdpartydingding.controller;

import com.dingding.thirdpartydingding.service.PersonnelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/6/910:20
 */
@Slf4j
@RestController
@RequestMapping("/personals")
public class PersonnelController {

    private final PersonnelService personnelService;

    public PersonnelController(PersonnelService personnelService) {
        this.personnelService = personnelService;
    }

    @GetMapping
    public String index(){
        return "ok";
    }

    //根据userid获取用户详情
    @GetMapping("/{userId}")
    public String findById(@PathVariable("userId")String userId,
                        @RequestParam(value = "language",required = false,defaultValue = "zh_CN")String language){
        String user = personnelService.findByUserId(userId, language);
        return user;
    }

    //获取部门用户userid列表
    //获取部门用户详情
    //获取管理员列表
    //获取部门用户基础信息
    //获取员工人数
    //根据unionid获取用户userid
    //删除用户
}
